
from ...utils import BaseModuleBuilder
from .celoss import CrossEntropyLoss, BinaryCrossEntropyLoss
from .alignment_loss import AlignmentLoss

'''LossBuilder'''
class LossBuilder(BaseModuleBuilder):
    REGISTERED_MODULES = {
        'CrossEntropyLoss': CrossEntropyLoss, 'BinaryCrossEntropyLoss': BinaryCrossEntropyLoss, 'AlignmentLoss':AlignmentLoss
    }
    '''build'''
    def build(self, loss_cfg):
        return super().build(loss_cfg)


'''BuildLoss'''
BuildLoss = LossBuilder().build
